#pragma once

#ifndef FIRE_H_
#define FIRE_H_

#include <list>
#include "PhysicalObject.h"

#include <SFML\Graphics\Shader.hpp>
#include "Player.h"

using namespace std;
using namespace sf;

class Fire : public PhysicalObject
{
public:
	Fire(GameState *gameState);
	~Fire();

	virtual void draw();

	virtual void update(double dt);

	virtual void beginContact(b2Contact *contact);

	virtual void endContact(b2Contact *contact);

	virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold);

	void setPlayer(Player *player){ m_player = player; player->setFire(this);}

	void setState(int state){ m_state = state; }
	
	int getState(){ return m_state; }

private:
	Shader *m_shader;

	Shader *m_shader2;

	Player *m_player;

	int m_state;

	double m_time;

	double m_travelTime;

	double m_restoreTime;

	double m_maxRestoreTime;

	double m_auraTime;
	
	double m_maxAuraTime;

	bool m_actionPressed;

	b2Vec2 m_vel;

	float m_auraRadius;

	float m_maxAuraRadius;

	Sound m_fire1Sound;
	
};

#endif
